import { Customer, Material } from "./basic";
import { ReqPage } from "./index";

export namespace Receive {
  // 来料单查询参数
  export interface ReqSearch extends ReqPage {
    status: string;
    key: string;
    c_cname: string;
    customerId: string;
    start: string;
    end: string;
  }

  // 来料单
  export interface ResSearch extends Customer.c_SearchProp {
    id: number;
    receiveCode: string;
    customerId: number;
    carNum: string;
    driverInfo: string;
    arrivalTime: string;
    arrivalDate: string;
    sumWeight: number;
    netWeight: number;
    grossWeight: number;
    packageCount: number;
    status: number;
    remark: string;
    douser: string;
    dotime: string;
    uptime: string;
    customerObj: Customer.SearchProp;
  }

  // 保存来料主信息
  export interface ReqSave {
    id?: number;
    customerName?: string;
    customerId: number;
    arrivalTime: number;
    carNum: number;
    driverInfo: number;
    sumWeight: number;
    netWeight: number;
    grossWeight: number;
    packageCount: number;
    remark: string;
    douser: string;
  }

  export interface ReqSaveDetail {
    receiveId: number;
    id: number;
    packageType: string;
    packageNum: string;
    locationId: string;
    flagGenPackageNum: number;
    packageCount: number;
    materialId: number;
    flagSo: string;
    flagSoConfirm?: number;
    flagSplitConfirm?: number;
    flagSplit: string;
    customerWeight: string;
    sumWeight: string;
    packageWeight: string;
    tare: string;
    grossWeight: string;
    warehouse: string;
    location: string;
    remark: string;
    douser: string;
  }

  // 来料单明细
  export interface ResSearchDetail extends Material.M_SearchProp {
    materialObj: Material.SearchProp;
    id: number;
    receiveId: number;
    packageType: string;
    packageNum: number;
    packageCount: number;
    materialId: number;
    customerWeight: number;
    sumWeight: number;
    packageWeight: number;
    grossWeight: number;
    flagSo: string | number;
    flagSplit: string | number;
    warehouse: string;
    location: string;
    remark: string;
    douser: string;
    dotime: string;
    uptime: string;
    flagGenPackageNum: string;
  }
}
